<!--<div class="content-section introduction ">-->
  <!--<div>-->
    <!--<span class="feature-title">巡检管理<span class="gt">&gt;</span>巡检对象库  </span>-->
  <!--</div>-->
<!--</div>-->
<div class="content-section implementation GridDemo">
  <div class="mysearch">
    <div class="ui-g">
      <div class="ui-g-4">
        <button pButton type="button"  label="模板下载"  (click)="exportExcel()" ></button>
        <button pButton type="button"  label="批量导入"  (click)="showImport()" ></button>
        <button pButton type="button"  label="删除"  (click)="deleteInspection()" [disabled]="selectInsepections.length === 0"></button>
      </div>
    </div>
  </div>
  <div class="ui-g">
    <div class="ui-g-12">
      <p-dataTable [value]="inspectionsObject"
                   [totalRecords]="totalRecords"  [(selection)]="selectInsepections">
        <p-column [style]="{'width':'38px'}" selectionMode="multiple"></p-column>
        <p-column  *ngFor="let col of cols" field="{{col.field}}" header="{{col.header}}"></p-column>
        <p-column header="操作">
          <ng-template let-car="rowData" pTemplate="body" let-i="rowIndex">
            <button pButton type="button" label="修改" (click)="updateOption(inspectionsObject[i])"></button>
          </ng-template>
        </p-column>
        <ng-template pTemplate="emptymessage">
          当前没有数据
        </ng-template>
      </p-dataTable>
      <p-paginator rows="10" [totalRecords]="totalRecords" [rowsPerPageOptions]="[10,20,30]" (onPageChange)="paginate($event)"></p-paginator>
    </div>
  </div>
</div>
<!--批量导入model-->
<p-dialog [(visible)]="display" modal="modal"  [responsive]="true">
  <p-header>
    批量导入
  </p-header>
  <div class="ui-g">
    <div class="ui-g-12">
      <div class="file-box">
        <form method="post" enctype="multipart/form-data">
          <input type='text' name='textfield' #textfield id='textfield' class='txt' />
          <input type='button' class='btn' value='浏览...' />
          <input type="file" name="fileField" class="file" id="fileField" #fileField size="28" onchange="textfield.value=fileField.value" [uploader]="uploader" ng2FileSelect /><br><br>
        </form>
      </div>
    </div>
  </div>
  <p-footer>
    <button type="button" pButton icon="fa-check" (click)="uploader.uploadAll();display=false;textfield.value='';fileField.value=''"  label="确定"></button>
    <button type="button" pButton icon="fa-close" (click)="display = false;textfield.value='';fileField.value=''" label="取消"></button>
  </p-footer>
</p-dialog>
<app-update-inspection-object
  *ngIf="showAddMask"
  (closeMask)="closeInspectionMask($event)"
  [currentInspection]="currentInpection"
  (updateDev)="updateInsepectionObject($event)"
>
</app-update-inspection-object>

<!--[currentInspection]="currentInpection"-->
<!--(updateDev)="updateInspection($event)"-->


